<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>汽车保险</title>
    <link rel="stylesheet" href="../static/layui/css/layui.css">
    <link rel="stylesheet" href="../static/xznstatic/css/common.css"/>
    <link rel="stylesheet" href="../static/xznstatic/css/style.css"/>
    <link rel="stylesheet" href="../static/css/bootstrap.css">
    <link href="../static/css/bootstrap.min.css" rel="stylesheet">
    <link href="../static/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="../static/css/style.min.css" rel="stylesheet">
    <script src="../static/js/jquery.min.js"></script>
    <style type="text/css">
       html, body {
            height: 100%;

        }
        #iframe {
            width: 100%;
            margin-top: 50px;
            padding-top: 94px;
        }
        #header {
            height: auto;
            background: #fff;
            border-bottom: 0;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            /*background-image: linear-gradient(to top,#3a90db ,#ddd);*/
            background: url("../static/img/login-bg-2.jpg");
            background-repeat: no-repeat;
            background-size: 100% 100%;
            background-attachment: fixed;
        }

        #header .nav-top {
            display: flex;
            align-items: center;
            padding: 0 20px;
            font-size: 16px;
            color: #2a8a15;
            box-sizing: border-box;
            height: 50px;
            background-color: rgba(255, 120, 0, 1);
            box-shadow: 0 0 20px #e88a64;
            justify-content: center;
            position: relative;
        }

        #header .nav-top-title {
            line-height: 40px;
            font-size: 20px;
            color: rgba(255, 255, 255, 1);
            padding: 0 10px;
            margin: 0 10px;
            border-radius: 0px;
            border-width: 0;
            border-style: solid;
            border-color: rgba(0,0,0,.3);
            box-shadow: ;
        }
        #header .nav-top-tel {
            line-height: 40px;
            font-size: 16px;
            color: #333;
            padding: 0 10px;
            margin: 0;
            border-radius: 6px;
            border-width: 0;
            border-style: solid;
            border-color: rgba(0,0,0,.3);
            box-shadow: ;
        }

        #header .navs {
            display: flex;
            padding: 0 20px;
            align-items: center;
            box-sizing: border-box;
            height: 94px;
            background-color: rgba(255, 248, 239, 1);
            box-shadow: 0 1px 6px rgba(0,0,0,0);
            justify-content: center;
        }
        #header .navs .title {
            width: auto;
            line-height: 40px;
            font-size: 16px;
            color: #333;
            padding: 0 10px;
            margin: 0 5px;
            border-radius: 6px;
            border-width: 0;
            border-style: solid;
            border-color: rgba(0,0,0,.3);
            box-shadow: 0 0 6px rgba(0,0,0,0);
        }
        #header .navs li {
            display: inline-block;
            width: auto;
            line-height: 34px;
            padding: 0 10px;
            margin: 0 5px;
            color: #333;
            font-size: 20px;
            border-radius: 6px;
            border-width: 0;
            border-style: solid;
            border-color: rgba(0,0,0,.3);
            background-color: rgba(255, 248, 239, 1);
            box-shadow: 0 0;
            text-align: center;
        }
        #header .navs li a{
            color: inherit;
        }
        #header .navs li.current a{
            color: inherit;
        }
        #header .navs li a:hover{
            color: inherit;
        }
        #header .navs li.current {
            color: rgba(226, 81, 17, 1);
            font-size: 20px;
            border-radius: 0px;
            border-width: 0;
            border-style: solid;
            border-color: rgba(255, 255, 255, 1);
            background-color: rgba(255, 248, 239, 1);
            box-shadow: 0 2px 0px #e25111;
        }

        #carouselExampleIndicators{
            width: 100%;
            height:600px;
        }
        #carouselExampleIndicators .carousel-inner{
            width: 100%;
            height: 600px;
        }
        .box3{

            width: 100%;
            height: 800px;

            margin-top: 100px;
        }
        table{
            width: 60%;
        }
       /*.box3{*/


       /*    left: 60px;*/
       /*    right: 0px;*/
       /*    top: 500px;*/
       /*    bottom: 0;*/
       /*    margin: auto;*/
       /*    border :solid     1px  black;*/
       /*    width: 40%;*/
       /*    height: 600px;*/
       /*    background-image: url("../static/img/login-bg-2.jpg");*/

       /*}*/

       /*label{*/

       /*    width: 150px;*/
       /*    margin-left: auto;*/

       /*    display: inline-block;*/
       /*    margin-top: 20px;*/

       /*    text-align: center;*/

       /*}*/
        th,td {

            height: 40px;

            line-height: 25px;

            text-align: center;

            border: 1px solid #ccc;

        }

        th {

            background: #eee;

            font-weight: normal;

        }
        tr {

            background: #fff;

        }

        tr:hover {

            background: #cc0;

        }
        button{
            width: 80%;
            height: 90%;

            border-radius: 10px/10px;

        }
        #b1{
            background:#16d17f;
        }
        #b2{
            background: red;
        }

    </style>
</head>
<body>
<!-- start 顶部导航栏 -->
<div id="header">
    <div v-if='true' class="nav-top">

        <div v-if="true" class="nav-top-title">智能车险投保系统</div>
        <div class="nav-top-tel"></div>
    </div>
    <div class="navs">
        <!-- <div class="logo" style="font-size: 20px;top: 32px;color: #fff;font-weight: bold;margin-left: -200px;width: 240px;" v-text="projectName"></div> -->
        <div class="title" v-if="false" v-text="projectName"></div>
        <div class="list">
            <ul>
                <li ><a th:href="@{shouye}" ><i v-if="false" class="layui-icon layui-icon-home"></i>首页</a></li>
                <li ><a th:href="@{echarts}" target="jj" ><i v-if="false" class="layui-icon layui-icon-list"></i>历史记录</a></li>
                <li class='current'><i v-if="false" class="layui-icon layui-icon-cart"></i>汽车保险</a></li>
                <li ><a th:href="@{fuwudating}"  ><i v-if="false" class="layui-icon layui-icon-util"></i>服务大厅</a></li>
                <li ><a th:href="@{personal}" ><i v-if="false" class="layui-icon layui-icon-username"></i>个人中心</a></li>
            </ul>
        </div>
    </div>



<div class ="box3" align="center">
    <table>
        <tr>
            <th>序号</th><th>车险名称</th><th>是否不计赔付</th><th>费率浮动</th><th>保险金额</th><th>保险费</th><th colspan="2">操作</th>
        </tr>

        <tr th:each="insurance,insuranceStat : ${carinsurance}">
            <td th:text="${insuranceStat.count}"></td>
            <td th:text="${insurance.insurancename}"></td>
            <td th:text="${insurance.notpay}"></td>
            <td th:text="${insurance.ratefloat}"></td>
            <td th:text="${insurance.insurancepay}"></td>
            <td th:text="${insurance.insurancemoney}"></td>
            <td class="op"><button class="qbtn" th:data-id="${insurance.coverageid}" id="b1">选择 </button></td>
            <td class="op"><button class="qbtn1" th:data-id="${insurance.coverageid}" id="b2">删除 </button></td>
        </tr>



    </table>

</div>



<script type="text/javascript">
    $(document).on('click','.qbtn',function (){
        // console.log("进来了")
        var param={"id":$(this).data("id")};
        // console.log(param)
        $.ajax({
            url:"/add",
            type:'post',
            data:param,
            dataType:'json',
            success:function (data){
                if(data==1){
                    alert('选择成功');
                }else {
                    alert('重复选择');
                }
            },
            error:function(xhr) {
                console.error(xhr.responseText);
            }
        });
    })


    $(document).on('click','.qbtn1',function (){
        // console.log("进来了")
        var param={"id":$(this).data("id")};
        // console.log(param)
        $.ajax({
            url:"/delete",
            type:'post',
            data:param,
            dataType:'json',
            success:function (data){
                if(data==1){
                    alert('取消成功');
                }else {
                    alert('取消失败');
                }
            },
            error:function(xhr) {
                console.error(xhr.responseText);
            }
        });
    })

</script>

</div>
<script src="../static/xznstatic/js/jquery-1.11.3.min.js"></script>
<script src="../static/layui/layui.js"></script>
<script src="../static/js/vue.js"></script>
<script src="../static/js/config.js"></script>

</body>
</html>

